package com.xiaoxi.templatemethodmode.service;

/**
 * @ClassName CharDisplay
 * @Description
 * @Author xiaoxi
 * @Date 2023/3/8 22:35
 * @Version 1.0
 */
public class CharDisplay extends AbstractDisplay {

    private Character character;

    public CharDisplay(Character character) {
        this.character = character;
    }

    @Override
    public void open() {
        System.out.print("<<");
    }

    @Override
    public void print() {
        System.out.print(character);
    }

    @Override
    public void close() {
        System.out.print(">>");
    }
}
